<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%><%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<tiles:insertDefinition name="layout">
	<tiles:putAttribute name="head">
		<script type="text/javascript">
	    $(function() {
		//Validform库的应用
		$("form").Validform({
		    ajaxPost : true,
		    customReset : true,
		    tiptype : ValidUtils.siblingTip,
		    datatype : ValidUtils.types("name", "title"),
		    callback : function(data) {
			helper.showMsg(data, {
			    okHandler : function() {
				location.href = 'response/listResponseInAssignment?mid=' + data.mid;
			    }
			});
		    }
		});
	    });
	</script>
	</tiles:putAttribute>
	<tiles:putAttribute name="mainBody">
		<ul class="breadcrumb">
			<li><a href="listUser">用户列表</a> <span class="divider">/</span></li>
			<li class="active">创建岗位</li>
		</ul>
		<form action="doCreateUser" method="post" class="form-horizontal">
			<fieldset>新建用户</fieldset>
			<div class="control-group">
				<label class="control-label">编号<span style="color: #F00">*</span></label>
				<div class="controls">
					<input type="text" name="id" />
					<span class="Validform_checktip"></span>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">英文名<span style="color: #F00">*</span></label>
				<div class="controls">
					<input type="text" name="name" datatype="title" />
					<span class="Validform_checktip"></span>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">中文名<span style="color: #F00">*</span></label>
				<div class="controls">
					<input type="text" name="title" datatype="name" />
					<span class="Validform_checktip"></span>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">所属岗位<span style="color: #F00">*</span></label>
				<div class="controls">
					<s:checkboxlist theme="simple" name="job" list="jobs" listKey="id" listValue="title"></s:checkboxlist>
					<span class="Validform_checktip"></span>
				</div>
			</div>
			<div class="control-group">
				<div class="controls">
					<button class="btn btn-primary" type="submit">
						<i class="icon-ok"></i> 提交
					</button>
				</div>
			</div>
		</form>
	</tiles:putAttribute>
</tiles:insertDefinition>